'use strict'
/**
 * 以下为各个模块的引入测试代码，开发时可按需引用
 */
//全局注册事件
const {initGlobalShort} = require('./globalRegister/globalRegister')
//自动更新模块引入
const {createUpdateWin} = require('./update/update')
//更新服务器地址
const autoUpdaterUrl = 'https://vrm.cloup.top:12333/electronUpdate/startelectron/'
//webSocket模块
const {startWs} = require('./webSocket/ws')
//http接口服务
const {startHttpService} = require('./httpService/httpService')
//系统通知
const {showNotification} = require('./systemNotification/systemNotification')
//托盘对象
const {createTrayIcon} = require('./createTray/createTray')
//读取配置文件
const {readConfig} = require('./readConfig/readConfig')
//引入主窗口文件
const {creatWin} = require('./mainWin/mianWin')
function initApp() {
    initGlobalShort()
    createUpdateWin(autoUpdaterUrl)
    startWs(1233)
    startHttpService(1222)
    createTrayIcon('离开APP')
    showNotification('App已经启动')
    readConfig('C:/doubleScreen/config.conf').then(data => {
        creatWin().then(r => {
            console.log('mainWin启动成功')
        })
    }).catch(err => {
        console.log(err)
    })
}
module.exports = {initApp}